/**
 * Created by Vector on 17/7/25.
 */

    var express = require('express');
    var app = express();
    var fs = require("fs");

    app.get('/listUsers', function (req, res) {
        fs.readFile( __dirname + "/" + "user.json", 'utf8', function (err, data) {
            console.log( data );
            res.end( data );
        });
    });

    app.get('*', function (req, res) {
        res.send('没有找到你要的页面');
        res.end();
    });


    var server = app.listen(3000, function () {

        var host = server.address().address;
        var port = server.address().port;

        console.log("应用实例，访问地址为 http://%s:%s", host, port);
    });